package com.lin.lostandfound.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@TableName("user")
public class User {

	@TableId(type = IdType.AUTO)
	private Integer id;
	private String userName;
	private String password;
	private String grade;
	private String name;
	private String nickName;
	private String telPhone;
	private String email;
	private String qq;
	private int state;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date createTime;
	private int isNew;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastLoginTime;

	public User() {
	}

	public User(String userName, String password, String grade,
                String telPhone, int state, Date createTime, int isNew) {
		this.password = password;
		this.grade = grade;
		this.telPhone = telPhone;
		this.state = state;
		this.createTime = createTime;
		this.isNew = isNew;
	}

	public User(String userName, String password, String grade, String name,
                String nickName, String telPhone, String email, String qq,
                int state, Date createTime, int isNew, Date lastLoginTime) {
		this.password = password;
		this.grade = grade;
		this.name = name;
		this.nickName = nickName;
		this.telPhone = telPhone;
		this.email = email;
		this.qq = qq;
		this.state = state;
		this.createTime = createTime;
		this.isNew = isNew;
		this.lastLoginTime = lastLoginTime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getTelPhone() {
		return telPhone;
	}

	public void setTelPhone(String telPhone) {
		this.telPhone = telPhone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getIsNew() {
		return isNew;
	}

	public void setIsNew(int isNew) {
		this.isNew = isNew;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", userName=" + userName + ", password="
				+ password + ", grade=" + grade + ", name=" + name
				+ ", nickName=" + nickName + ", telPhone=" + telPhone
				+ ", email=" + email + ", qq=" + qq + ", state=" + state
				+ ", createTime=" + createTime + ", isNew=" + isNew
				+ ", lastLoginTime=" + lastLoginTime + "]";
	}

}
